﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using FeedNet;

namespace TestFeedNet
{
    /// <summary>
    /// Summary description for TestGetFeed
    /// </summary>
    [TestClass]
    public class TestGetFeed
    {
        public TestGetFeed()
        {
            
        }

        [TestMethod]
        public void getFeed()
        {
            Feeder testFeeder = new Feeder();
            Feed x = testFeeder.getFeed("http://feedproxy.google.com/TechCrunch");
            Assert.IsNotNull(x);
        }

        [TestMethod]
        public void getFeedTestFeedURL()
        {
            Feeder testFeeder = new Feeder();
            Feed x = testFeeder.getFeed("http://feedproxy.google.com/TechCrunch");
            Assert.AreEqual("http://feedproxy.google.com/TechCrunch", x.feed_url);
        }

        [TestMethod]
        public void updateFeed()
        {
            Feeder testFeeder = new Feeder();
            Feed x = testFeeder.getFeed("http://feedproxy.google.com/TechCrunch");
            Feed y = testFeeder.updateFeed(x);
            Assert.IsNotNull(x);
        }

       
    }
}
